<?php
namespace app\index\controller;

class Index
{
    public function index()
    {
        $addons_dir = ROOT_PATH.'addons/';
        $addons = glob($addons_dir.'*', GLOB_ONLYDIR);
        $addons_name = array_map('basename', $addons);
        $data = [];
        foreach($addons as $v){
            $data[] = include $v."/config.php";
        }
        return view('index', compact('data'));
    }
}
